package com.glaciervirtualdevice.Generator;

import java.util.Random;

public class SnGenerator {
    private static final Random random = new Random();

    /**
     * 生成以 M 开头，后面跟着 7 位数字的字符串
     * @return 生成的字符串
     */
    public static String getSn() {
        StringBuilder sb = new StringBuilder("M");
        for (int i = 0; i < 7; i++) {
            sb.append(random.nextInt(10));
        }
        return sb.toString();
    }

//    public static void main(String[] args) {
//        String mNumber = generateMNumber();
//        System.out.println("生成的以 M 开头的 7 位数字: " + mNumber);
//    }
}    